package com.kantboot.user.controller;


import com.kantboot.user.entity.CesUser;
import com.kantboot.user.service.CesWechatUserService;
import com.kantboot.user.vo.CesUserVO;
import com.kantboot.util.RestResult;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;

@RestController
@RequestMapping("/user/ces-wechat-user")
public class CesWechatUserController {

    @Resource
    CesWechatUserService cesWechatUserService;

    /** 登录 */
    @RequestMapping("/login")
    public RestResult<CesUser> login(
            @RequestBody CesUserVO cesUserVO
            , HttpServletRequest request){
        return RestResult.success(
                cesWechatUserService.login(cesUserVO),
                "获取用户信息成功");
    }

}

